package flc.ast.dialog;

import android.app.Activity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.ToastUtils;

import flc.ast.R;
import flc.ast.databinding.DialogDeleteBinding;
import flc.ast.databinding.DialogRecordBinding;
import flc.ast.utils.Content;
import stark.common.basic.base.BaseEventDialog;

public class DeleteDialog extends BaseEventDialog<DialogDeleteBinding> implements View.OnClickListener {


    public DeleteDialog(@NonNull Activity activity) {
        super(activity);
    }


    @Override
    protected int getContentLayoutId() {
        return R.layout.dialog_delete;
    }

    @Override
    protected void initContentView(View view) {
        mContentDataBinding.ivDeleteCancel.setOnClickListener(this);
        mContentDataBinding.ivDeleteConfirm.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ivDeleteCancel:
                dismiss();
                break;
            case R.id.ivDeleteConfirm:
                if (listener != null) {
                    listener.onClickConfirm();
                }
                break;
        }
    }

    private IListener listener;

    public void setListener(IListener listener) {
        this.listener = listener;
    }

    public interface IListener {
        void onClickConfirm();
    }
}
